<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			input.error{  
			border: 2px dashed red;  
			}
			label.error{
				color: red;
			}
		</style>
		<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/lib/jquery.js"></script>
		<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/jquery.validate.min.js"></script>
		<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script>
		<script>
			$.validator.setDefaults({
			    submitHandler: function() {
			      alert("提交事件!");
			    }
			});
			$().ready(function() {
			    $("#commentForm").validate();
			});
		</script>
	</head>
	<body>
		<form action="3.html" id="commentForm">
			<input type="email" id="em" name="em"  required/>
			<input type="submit"/>
		</form>
	</body>
</html>
